<template>
  <div class="">
    <p>{{count}}</p>
    <p>
      <el-button @click="increment">+</el-button>
      <el-button @click="decrement">-</el-button>

    </p>
  </div>
</template>
<script>



  export default {
    data: function () {
      return {
        hello: 'hello world'
      }

    },
    computed: {
      count(){
        return this.$store.getters.getCount;
      }
    },
    methods: {
      increment() {
        this.$store.commit('increment',{
          amount:10
        })
      },
      decrement() {
        this.$store.commit('decrement')
      }
    }
  }
</script>
<style scoped>


</style>

